package priv.conceit.study.book.lambda.chapter5;

import priv.conceit.study.book.lambda.common.entity.Album;
import priv.conceit.study.book.lambda.common.entity.SampleData;

import java.util.stream.Collectors;

/**
 * 高级集合类 和 收集器
 * 5.3.5
 * 字符串
 *
 *
 *
 * @author Conceit
 * @since 1.0.0, 2021/10/1
 */
public class Strings {


    public static void main(String[] args) {
        //获取所有专辑名 并转为大写。开头结尾以中括号包裹，元素以-分割
        String result=SampleData.albumAllStream.map(Album::getName).map(String::toUpperCase).collect(Collectors.joining("-","[","]"));
        System.out.println(result);
    }
}
